from ai_assistant import AIAssistant

class DataAnalysisAssistant(AIAssistant):
    def __init__(self, id, name, version, is_online, ability_score, supported_data_formats):
        super().__init__(id, name, "数据分析", version, is_online, ability_score)
        self.supported_data_formats = supported_data_formats
    
    def execute_task(self, task_content):
        return f"[{self.get_name()}] 执行数据分析任务：\n任务内容：{task_content}\n处理结果：基于{self.supported_data_formats}格式数据完成统计分析，生成可视化报表"
    
    # Getter and setter for supported_data_formats
    def get_supported_data_formats(self):
        return self.supported_data_formats
    
    def set_supported_data_formats(self, supported_data_formats):
        self.supported_data_formats = supported_data_formats
    
    def __str__(self):
        return super().__str__() + f", 支持数据格式: {self.supported_data_formats}"